﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetFrameworkExtensions.Utils
{
  public class ValueChangedEventArgs<T> : EventArgs
  {
    public ValueChangedEventArgs(T value, T previousValue)
    {
      this.PreviousValue = previousValue;
      this.Value = value;
    }

    public ValueChangedEventArgs(T value)
    {
      this.PreviousValue = Optional<T>.Null;
      this.Value = value;
    }

    public Optional<T> PreviousValue { get; private set; }

    public T Value { get; private set; }
  }
}
